package com.dyh.service.serviceImpl;

import com.dyh.po.farmer;
import com.dyh.service.farmerService;
import com.dyh.dao.farmerDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class farmerServiceImpl implements farmerService {
    @Autowired
    private farmerDao farmerdao;

    @Override
    public List<farmer> findAllFarmer(String keyword) {
        return farmerdao.findAllFarmer(keyword);
    }

    @Override
    public Boolean addFarmer(farmer farmer) {
        return farmerdao.addFarmer(farmer);
    }

    @Override
    public Boolean deleteFarmer(String familyId) {
        return farmerdao.deleteFarmer(familyId);
    }

    @Override
    public Boolean editFarmer(farmer farmer) {
        return farmerdao.editFarmer(farmer);
    }

    @Override
    public farmer findFarmerById(String familyId) {
        return farmerdao.findFarmerById(familyId);
    }
}
